473,443 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dynamic create tab pages on a tab control

I done some looking on Google and could not come up with a way to
dynamically create tab pages on a tab control.

Does anyone have a link to any examples.

Regards
Jeff
Oct 24 '07 #1
3 22248
Jeff,

Why not just use the Add method on the TabPageCollection returned by the
TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jeff" <jeff@[_nospam_].hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>I done some looking on Google and could not come up with a way to
dynamically create tab pages on a tab control.

Does anyone have a link to any examples.

Regards
Jeff

Oct 24 '07 #2
Thanks Nicholas

I have come from another programming language where each tab was a form
and thought this would be harder than you just indicated.

Ok now how can I stop the pages from being added to the form on
initialization.

At the moment when a form open it creates all the tabs which takes time.
Is there a property I can set to prevent the pages being created and
then use this method to add the ones I want.

Nicholas Paldino [.NET/C# MVP] wrote:
Jeff,

Why not just use the Add method on the TabPageCollection returned by the
TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);

Oct 24 '07 #3
Jeff,

If you don't want the pages to be added when the form is opened, then
you will have to remove the pages, and then add them programatically
elsewhere.

You can look at the designer-generated code and move that to another
section.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jeff" <jeff@[_nospam_].hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
Thanks Nicholas

I have come from another programming language where each tab was a form
and thought this would be harder than you just indicated.

Ok now how can I stop the pages from being added to the form on
initialization.

At the moment when a form open it creates all the tabs which takes time.
Is there a property I can set to prevent the pages being created and then
use this method to add the ones I want.

Nicholas Paldino [.NET/C# MVP] wrote:
>Jeff,

Why not just use the Add method on the TabPageCollection returned by
the TabPages property on the TabPage control?

// The tabpage.
TabPage tabPage = new TabPage();

// Add to the tab control.
tabControl.TabPages.Add(tabPage);
Oct 25 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Danny | last post by:
How do you guys make listings such as product listings and their detail pages more crawler friendly, if they are genrated using dynamic asp pages. If your ASP uses a format like this:...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
0
by: gg.2.starfire | last post by:
WebCheck (http://www.raycosoft.com/rayco/products/webcheck) is a program for testing and analyzing static or dynamic web pages. WebCheck fetches web pages, applies detailed tests to each web page...
15
by: theo | last post by:
Hi, I'm working on a horizontal row menu, to use like folder tabs. Does anyone know what the CSS style "cursor" is supposed to produce? Any working samples? I put it in the code, but can't see...
2
by: hb | last post by:
Hi, I have a page that uses dynamic generated web user control. On the eupdate.aspx, I get: === <asp:table id="tblE" runat="server"> <asp:tablerow id="rE" runat="server"> <asp:tablecell...
1
by: Grey | last post by:
is it possible to dynamic create control in runtime. I want to create a new textbox on every click on the button.
3
by: Grey | last post by:
I know i can use placeholder control for dynamic create controls. but my requirement is i need to create multiple controls. when the user click the button, one textbox will be created. If user...
1
by: zhouzhendong | last post by:
Hi, I just wonder whether it is possible to create Tab Control in runtime? The reason I want that is as follows: I wanna show a table that contains several categories of information of clients,...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
5
by: Charles Zhang | last post by:
I am creating dynamic web pages according to the user inputs from a web page. For instance, a user typed in a text, I would want the text being the source code of the dynamic page. My...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.